function x1 = find_threshold_arg(x, y, threshold)

    x1 = NaN;

    y = y - threshold;
    for i = 2:size(y, 1)
        if (y(i)*y(i-1) < 0)
            x1 = x(i);
            return;
        end
    end
    
    error('Cannot find estimation of falling');

end